POV-Ray : Newsgroups : povray.newusers : reset/strip textures? : Re: reset/strip textures? Server Time
1 Jul 2024 15:20:31 EDT (-0400)
  Re: reset/strip textures?  
From: Jim Charter
Date: 9 Jan 2005 01:37:18
Message: <41e0d11e@news.povray.org>
Rafal 'Raf256' Maj wrote:
> Hi,
> if I have an object with already have some texture, how can I discard all 
> texture settings from it (strip texture), and apply a new texture to it?
> 
> Example:
> 
> 
> #declare obj = 
> union {
>   sphere { -x 1 pigment { rgb x } } // ((B))
>   sphere { +x 1 pigment { rgb y } } // ((C))
>   sphere { +y 1 }  sphere { -z .1 }
>   pigment { rgb .5 }
>   scale 100 rotate y*30
>   translate y*100
> }
> 
> object { 
>   obj 
>   pigment { rgb 1 } // ((A))
> }
> 



The most locally applied texture always overrides the more generally 
applied one (not vice versa).  In your example even if you removed the 
pigments to spheres in B and C  the pigment ( rgb .5 ) in the union 
block would still override A in the object block.

But the intention of your question is not clear.  What do you want to do 
exactly, avoid the manual editing in the spheres?  Are you changing the 
texture during an animation?  You could use the clock value to adjust 
the texture or actually wrap the objects in a macro and pass the texture 
that way I suppose.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.